<?php
// Module Definition
$module['name'] = 'Courier POP3/IMAP';
$module['description'] = 'Maintain user mailboxes with user@domain.tld access';
$module['excludes'] = array('pop3');
// Note perhaps this module should be called Mail or something to encompass IMAP
//   control as well..
// Support for POP3 server control is not being added straight away for simplicity and to
//  check whether it affects other parts of webcp.
global $T;
$T["pop3 service"]="POP3D";
$T["pop3-ssl service"]="POP3D-SSL";
$T["imap service"]="IMAPD";
$T["imap-ssl service"]="IMAPD-SSL";
$T["authdaemon service"]="Courier Authdaemon";

switch($action) {
	case 'register':
		break;
	case 'unregister':
		break;
	case 'hook':
		// Server hooks
		//register_hook('server:cfg', 'courier_add_cfg');
                register_hook('server:user:create', 'courier_user_add',1);
		register_hook('server:user:update', 'courier_user_update', 1);
		//register_hook('server:user:remove', 'courier_user_remove', 1);
		register_hook('server:service:monitor', 'courier_monitor');
		register_hook('server:service:start:pop3', 'courier_start');
		register_hook('server:service:stop:pop3', 'courier_stop');
		register_hook('server:service:restart:pop3', 'courier_restart');
		break;
}
?>